package com.haima.sage.bigdata.api.frame.condition.expression.impl;

import java.util.Date;

import com.haima.sage.bigdata.api.frame.condition.expression.BaseLogicService;

public class EqualsIgnoreCaseLogicService extends BaseLogicService {
    public EqualsIgnoreCaseLogicService(Object param) {
        super(param);
    }

    @Override
    protected boolean logicNotEmpty(String object) throws Exception {
        return strParam.equalsIgnoreCase(object);
    }

    @Override
    protected boolean logicNotEmpty(Date object) throws Exception {
        return object.getTime() == dateParam;
    }

    @Override
    protected boolean logicNotEmpty(Byte object) throws Exception {
        return object.byteValue() == byteParam.byteValue();
    }

    @Override
    protected boolean logicNotEmpty(Short object) throws Exception {
        return shortParam.shortValue() == object.shortValue();
    }

    @Override
    protected boolean logicNotEmpty(Integer object) throws Exception {
        return object.intValue() == intParam.intValue();
    }

    @Override
    protected boolean logicNotEmpty(Long object) throws Exception {
        return object.longValue() == longParam.longValue();
    }

    @Override
    protected boolean logicNotEmpty(Float object) throws Exception {
        return object.floatValue() == floatParam.floatValue();
    }

    @Override
    protected boolean logicNotEmpty(Double object) throws Exception {
        return object.doubleValue() == doubleParam.doubleValue();
    }

    @Override
    protected boolean logicNotEmpty(Boolean object) throws Exception {
        return boolParam.equals(object);
    }

    @Override
    protected boolean logicNotEmpty(Character object) throws Exception {
        return object.charValue() == charParam.charValue();
    }
}
